1. Statement of the Technical Field
The present invention relates to load balancing among server and server process clones, and more particularly to session affinity within a server group.
2. Description of the Related Art
A model is a template for creating additional, nearly identical copies of a server or process instance, such as an application server or Web container. The copies of the server or process instances are commonly referred to as “clones”. In consequence, the act of creating a clone has been commonly referred to as “cloning”. Cloning provides several advantages over the mere freestanding replication of a server or process instance. Some advantages include improved fail-over support, workload management, and efficient vertical scaling. For instance, in the case of fail-over, with several cloned servers or process instances available to handle requests, it is more likely that failures will not damage the throughput and reliability of the system. That is, if one clone fails, another can be used. In the case of vertical scaling, the expansive resources of an under-utilized host server can be consumed.
In the case of workload management, when a model changes, the changes can propagate to all cloned servers and server processes based upon the model without requiring the manual application of those changes to individual freestanding replicants. Also, being able to route a request to any server or server process in a group of identical servers or server processes can allow the host servers in the group to share work. Thus, throughput of method invocations can be improved. Finally, requests can be evenly distributed to host servers to prevent workload imbalances in which one or more host servers have ideal or low activity while others are overburdened. This “load balancing” activity often is viewed as the principle benefit of workload management.
In typical server cloning environments, session affinity can be applied. Session affinity refers to the logical linkage between a requesting client and a responsive clone or process in a server group, where both the requesting client and the responsive clone have engaged in a communicative session. In particular, within a session, once a server clone has been selected to respond to the requests of a client, the selected clone can remain bound to the requesting client throughout the duration of the session. As a result of this binding, the prevailing selection policy need be applied only once in a session and the overhead resulting from the needless re-application of the selection policy can be avoided. Presently, session based affinity can be implemented using either a cookie-based approach, or a URL rewriting approach as is known in the art. Traditional session affinity strategies can fall victim to typical scaling issues. For instance, the session between a clone and client can randomly “time out”, based upon the inactivity of a particular session. In consequence, the work load experienced across the server group can settle into a pattern where certain clones are processing significantly more requests than other clones.
In order to address this issue, some load balancing techniques utilize timeout logic in a second cookie when using a cookie-based session affinity approach. The use of a second cookie cannot accommodate a URL rewriting approach as is common in the art. In particular, the security concerns of end-users often precludes the use of a cookie-based approach to session affinity.
Notably, conventional clone architectures require management of session affinity in a centralized workload manager. In this way, session affinity can be determined in a single location based upon the loads experienced by all managed clones. To support a centralized workload manager, however, given the possibility of a session affinity time out condition, clones must flush session state information to the centralized persistent store after each client transaction, thus unnecessarily consuming additional network resources. Hence, conventional session affinity techniques can be viewed as inherently deficient in the face of a scalable server group.